﻿using System;
using System.Data.SQLite;
using System.Windows.Forms;
using Eagleshoes.PackingBarcode.PackagingScan.Offline;

namespace Eagleshoes.PackingBarcode.PackagingScan
{
    public partial class PackagingScanMenuForm : Form
    {
        public PackagingScanMenuForm()
        {
            InitializeComponent();
        }

        private void ScanForm_KeyUp(object sender, KeyEventArgs e)
        {

            switch (e.KeyCode)
            {
                case Keys.F1:
                    Form f1 = new PackagingOfflineMenuForm();
                    f1.ShowDialog();
               
                    break;
                case Keys.F2:
                    Form f2 = new PackagingOnlineScanForm();
                    f2.ShowDialog();
            
                    break;
                case Keys.F10:
                case Keys.Escape:
                    Close();
                    break;
                default:
                    if (e.KeyValue == 122)
                    {
                        Close();
                    }
                    break;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form f1 = new PackagingOfflineMenuForm();
            f1.ShowDialog();
        }


        private void button4_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnShowOnlineForm_Click(object sender, EventArgs e)
        {
            Form f4 = new PackagingOnlineScanForm();
            f4.ShowDialog();
        }

        private void PackagingScanMenuForm_Load(object sender, EventArgs e)
        {
            ControlBox = false;
            WindowState = FormWindowState.Maximized;
        }

     
    }
}